home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt3sp1.arc
/
DUPL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-09
|
2KB
|
41 lines
(*--------------------------------------------------------------------------*)
(* Dupl -- Duplicate a character n times *)
(*--------------------------------------------------------------------------*)
FUNCTION Dupl( Dup_char : Char; Dup_Count: INTEGER ) : AnyStr;
(*--------------------------------------------------------------------------*)
(* *)
(* Function: Dupl *)
(* *)
(* Purpose: Duplicate a character n times *)
(* *)
(* Calling Sequence: *)
(* *)
(* Dup_String := Dupl( Dup_Char: Char; Dup_Count: INTEGER ): AnyStr; *)
(* *)
(* Dup_Char --- Character to be duplicated *)
(* Dup_Count --- Number of times to duplicate character *)
(* Dup_String --- Resultant duplicated string *)
(* *)
(* Note: If Dup_Count <= 0, a null string is returned. *)
(* *)
(* Calls: None *)
(* *)
(*--------------------------------------------------------------------------*)
VAR
S : AnyStr; (* Holds incomplete result *)
I : INTEGER; (* Counter *)
BEGIN (* Dupl *)
S := '';
FOR I := 1 to Dup_Count DO
S := S + Dup_Char;
Dupl := S;
END (* Dupl *);